<?php
class mail
{
	public $mailer = null;
	  
	function __construct()
	{
		$this->create_mailer();
	}
	
	private function create_mailer()
	{
		$this->mailer  = new phpmailer();
		$this->mailer->IsSMTP();
		$this->mailer->SMTPAuth   	= "true";
		$this->mailer->SMTPSecure 	= null;
		$this->mailer->Host       	= "www.iphonepicker.com";
		$this->mailer->Port       	= "25";
		$this->mailer->Username   	= "iphonepicker";
		$this->mailer->Password   	= "iphonepicker8516098";
		$this->mailer->From 		= "info@iphonepicker.com";
		$this->mailer->FromName 	= "Contact-us form";
		$this->mailer->Encoding 	= "quoted-printable";
		$this->mailer->IsHTML(true); 
	}
	
	public function contact_us_mail($subject, $data, $email)
	{
		$this->mailer->Subject 	= "Contact request";
		$this->mailer->AltBody	= "";
		$this->mailer->MsgHTML("<html><body>
		<h2>$subject</h2>
		<h2>$email</h2>
		<p>$data</p>
		</body></html>");
		$this->mailer->AddAddress("info@iphonepicker.com", "");
		$this->mailer->Send();
	}
}